package com.ciaojian.worker.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ciaojian.core.mapper.WorkerAuthorityMapper;
import com.ciaojian.core.model.WorkerAuthority;
import com.ciaojian.core.service.WorkerAuthorityService;
import com.ciaojian.core.util.Result;
import com.ciaojian.core.model.vo.AuthorityGroupVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author cano
 */
@Service
public class WorkerAuthorityServiceImpl extends ServiceImpl<WorkerAuthorityMapper, WorkerAuthority> implements WorkerAuthorityService {

    @Resource
    private WorkerAuthorityMapper workerAuthorityMapper;

    @Override
    public Result getAuthorityGroup(Integer workerId, Integer type) {
        List<AuthorityGroupVo> authorityGroup = workerAuthorityMapper.getAuthorityGroup(workerId, type);
        return Result.ok(authorityGroup);
    }
}
